package com.yongninger.adapter;

import java.util.HashMap;
import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.SimpleAdapter;
import android.widget.TextView;

import com.yongninger.activity.R;

public class UserListViewAdapter extends ListViewAdapter {
	public UserListViewAdapter(Context context,
			List<HashMap<String, Object>> items) {
		super(context, items);
	}

	@Override
	public View getView(int position, View view, ViewGroup parent) {
		if (view == null) {
			view = inflater.inflate(R.layout.user_item, null);
		}
		TextView uid = (TextView) view.findViewById(R.id.uid);
		uid.setText(items.get(position).get("uid").toString());
		TextView uname = (TextView) view.findViewById(R.id.uname);
		uname.setText(items.get(position).get("uname").toString());
		TextView upwd = (TextView) view.findViewById(R.id.upwd);
		upwd.setText(items.get(position).get("upwd").toString());
		TextView utype = (TextView) view.findViewById(R.id.utype);
		utype.setText(items.get(position).get("utype").toString());
		return view;
	}
}
